package com.heima.admin.service.impl;

import com.heima.admin.service.AuthService;
import com.heima.apis.user.IAPUserRealnameClient;
import com.heima.model.common.dtos.ResponseResult;
import com.heima.model.user.dtos.AuthDto;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author xjs
 * @date 2022/9/5 17:56
 * description
 */
@Service
public class AuthServiceImpl implements AuthService {

    @Autowired
    private IAPUserRealnameClient client;

    @Override
    public ResponseResult list(AuthDto authDto) {
        return client.authsList(authDto);
    }

    @Override
    public void authPass(AuthDto authDto) {
        if (2 == authDto.getStatus()) client.authFail(authDto);
        else client.authPass(authDto);
    }


}
